SW=
cc = sw5cc -host 
cc_slave = sw5cc -slave 

DEBUG = -DCHECK #-g
OPT = -O3 #0 -g #-O3 -std=gnu99

SCHEDULER_INSTALL_PATH=${DAG_HOME}/dag_task_scheduler
EXTRA_FLAGS= -D_DIM=64 -D_NB=32 #-DMMEM
LIBFLAGS =  -L${SCHEDULER_INSTALL_PATH}/lib -ldag_task_scheduler -lstdc++ -lm -lswperf
CFLAGS = $(DEBUG) $(OPT) $(EXTRA_FLAGS) -Wall -I${SCHEDULER_INSTALL_PATH}/include  

dag:cholesky_dag_master.o cholesky_dag_slave.o
	$(cc_slave) -hybrid   $(CFLAGS)  -o cholesky_dag cholesky_dag_master.o cholesky_dag_slave.o $(LIBFLAGS)
cholesky_dag_master.o: cholesky_dag_master.c	
	$(cc) $(CFLAGS) -c  cholesky_dag_master.c  $(LIBFLAGS)
cholesky_dag_slave.o: cholesky_dag_slave.c
	$(cc_slave) $(CFLAGS)  -c cholesky_dag_slave.c  $(LIBFLAGS)

clean:
	@-rm -f *.o
	@-rm -f cholesky_dag   
	@-rm -f *mod *csv *jpg *png loop_de* 
